<?php

namespace common\models\datas;

use Yii;

/**
 * This is the model class for table "{{%consume_pay_mode}}".
 *
 * @property integer $id
 * @property integer $module_id
 * @property string $code
 * @property string $pay_method
 * @property string $money
 * @property integer $type
 */
class ConsumePayMode extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%consume_pay_mode}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['module_id', 'type'], 'integer'],
            [['money'], 'number'],
            [['code'], 'string', 'max' => 50],
            [['pay_method'], 'string', 'max' => 20],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('common', 'ID'),
            'module_id' => Yii::t('common', '充值或消费id'),
            'code' => Yii::t('common', '充值方式code'),
            'pay_method' => Yii::t('common', '针对模块 （customer 会员 student 学员）'),
            'money' => Yii::t('common', '金额'),
            'type' => Yii::t('common', '类型（1 充值 2 消费）'),
        ];
    }
}
